/**
 *  iBizSys 5.0 机器人生产代码（不要直接修改当前代码）
 *  http://www.ibizsys.net
 */
package com.sa.litetwo.app.card.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import net.ibizsys.paas.appmodel.AppModelGlobal;
import net.ibizsys.paas.appmodel.IApplicationModel;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import net.ibizsys.paas.sysmodel.ISystemModel;
import net.ibizsys.paas.sysmodel.SysModelGlobal;
import net.ibizsys.paas.controller.ViewControllerGlobal;
import net.ibizsys.paas.ctrlmodel.ICtrlModel;
import net.ibizsys.paas.ctrlhandler.ICtrlHandler;


import com.sa.litetwo.srv.liteTwoSysModel;
import com.sa.litetwo.app.AppAppModel;


/**
 * 视图[GG_SKILLEditView]控制类基类
 *
 * !! 不要对此代码进行修改
 */
@Controller
@RequestMapping(value = "/App/Card/GG_SKILLEditView.do")
public class GG_SKILLEditViewController extends net.ibizsys.paas.controller.EditViewControllerBase{
     public GG_SKILLEditViewController() throws Exception{
	 super();
         this.setId("d9b0cbc6078beb0641709d5ac129720b");
         this.setCaption("技能");
         this.setTitle("技能编辑视图");
		this.setCapLanResTag("DE.LNAME.GG_SKILL");
		this.setTitleLanResTag("PAGE.TITLE.GG_SKILL.EDITVIEW");
         this.setAccessUserMode(2);
          //
          this.setAttribute("UI.CTRL.FORM","TRUE");
          //显示数据信息栏
          this.setAttribute("UI.SHOWDATAINFOBAR","TRUE");
          //
          this.setAttribute("UI.CTRL.TOOLBAR","TRUE");

         ViewControllerGlobal.registerViewController("/App/Card/GG_SKILLEditView.do",this);
         ViewControllerGlobal.registerViewController("com.sa.litetwo.app.card.controller.GG_SKILLEditViewController",this);
     }
  
     
     @Override
    protected void prepareViewParam() throws Exception
    {
    	super.prepareViewParam();
      

    }

    private liteTwoSysModel liteTwoSysModel;
    
    public  liteTwoSysModel getliteTwoSysModel() {
           if(this.liteTwoSysModel==null)
           {
               try
                {
                      this.liteTwoSysModel = (liteTwoSysModel)SysModelGlobal.getSystem("com.sa.litetwo.srv.liteTwoSysModel");
                }
                catch(Exception ex)
                {
                }
           }       
           return this.liteTwoSysModel;
      }

       @Override
       public  ISystemModel getSystemModel() {
        return this.getliteTwoSysModel();
    }

       
       private AppAppModel appAppModel;
       public  AppAppModel getAppAppModel() {
            if(this.appAppModel==null)
            {
                try
                 {
                       this.appAppModel = (AppAppModel)AppModelGlobal.getApplication("com.sa.litetwo.app.AppAppModel");
                 }
                 catch(Exception ex)
                 {
                 }
            }       
            return this.appAppModel;
       }

        @Override
        public  IApplicationModel  getAppModel() {
         return this.getAppAppModel();
     }

     


     
      private com.sa.litetwo.srv.card.demodel.GG_SKILLDEModel gG_SKILLDEModel;

      public  com.sa.litetwo.srv.card.demodel.GG_SKILLDEModel getGG_SKILLDEModel() {
            if(this.gG_SKILLDEModel==null){
                try
                {
                     this.gG_SKILLDEModel = (com.sa.litetwo.srv.card.demodel.GG_SKILLDEModel)DEModelGlobal.getDEModel("com.sa.litetwo.srv.card.demodel.GG_SKILLDEModel");
                }
                catch(Exception ex)
                {
                }
            }
           return this.gG_SKILLDEModel;
      }

       public  IDataEntityModel getDEModel() {
          return this.getGG_SKILLDEModel();
      }
    
    public  com.sa.litetwo.srv.card.service.GG_SKILLService getGG_SKILLService() {
    	  try
          {
               return (com.sa.litetwo.srv.card.service.GG_SKILLService)ServiceGlobal.getService("com.sa.litetwo.srv.card.service.GG_SKILLService",this.getSessionFactory());
          }
          catch(Exception ex)
          {
        	  return null;
          }
    }

     /* (non-Javadoc)
  	 * @see net.ibizsys.paas.controller.IViewController#getService()
  	 */
  	@Override
  	public IService getService()
  	{
  		return getGG_SKILLService();
  	}


     


     /**
      * 准备部件模型
      * @throws Exception
      */
     @Override
     protected void prepareCtrlModels()throws Exception{
          //注册 form
          ICtrlModel editForm=(ICtrlModel)getliteTwoSysModel().createObject("com.sa.litetwo.app.srv.card.ctrlmodel.GG_SKILLMainEditFormModel");
          editForm.init(this);
          this.registerCtrlModel("form",editForm);
     }
	
     /**
      * 准备部件处理对象
      * @throws Exception
      */
     @Override
     protected void prepareCtrlHandlers()throws Exception{
          //注册 form
          ICtrlHandler editForm = (ICtrlHandler)getliteTwoSysModel().createObject("com.sa.litetwo.app.card.ctrlhandler.GG_SKILLEditViewEditFormHandler");
          editForm.init(this);
          this.registerCtrlHandler("form",editForm);
     }

 
     /**
      * 注册界面行为
      * @throws Exception
      */
     @Override
     protected void prepareUIActions()throws Exception{
	
     }
}